<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <title  class="systemName"></title>
    <base id="base" href="/">
    <link rel="stylesheet" href="css/common/public.css">
    <link rel="stylesheet" href="plugin/bootstrap-table-master/bootstrap-table.min.css">
</head>
<body class="gray-bg">
<div id="app" v-cloak>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>定时任务</h5>
                        <div class="ibox-tools"></div>
                    </div>
                    <div class="ibox-content">
                        <div class="row row-lg search">
                            <div class="row">
                                <div class="col-sm-2">
                                    <label class="col-sm-4">任务名称</label>
                                    <div class="col-sm-7">
                                        <input type="text" v-model="jobName" class="form-control" @keyup.enter="search">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <label class="col-sm-4">任务负责人</label>
                                    <div class="col-sm-7">
                                        <input type="text" v-model="author" class="form-control" @keyup.enter="search">
                                    </div>
                                </div>
                                <div class="col-sm-1">
                                    <button type="button" class="btn btn-info" @click="search">
                                        <span class="glyphicon glyphicon-search"></span> 搜索
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="row row-lg">
                            <div class="col-sm-12">
                                <!--toolbar-->
                                <div id="toolbar" class="btn-group m-t-sm">
                                    <button type="button" data-check-permission="schedule:task:add" class="btn btn-outline btn-default" @click="add">
                                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>&nbsp;新增
                                    </button>
                                    <button type="button" data-check-permission="schedule:task:edit" class="btn btn-outline btn-default" @click="edit">
                                        <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>&nbsp;修改
                                    </button>
                                    <button type="button" data-check-permission="schedule:task:delete" class="btn btn-outline btn-default" @click="del">
                                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>&nbsp;删除
                                    </button>
                                    <button data-check-permission="schedule:task:pause" class="btn btn-outline btn-default" type="button" @click="pause">
                                        <span class="fa fa-pause">&nbsp;暂停</span>
                                    </button>
                                    <button data-check-permission="schedule:task:resume" class="btn btn-outline btn-default" type="button" @click="resume">
                                        <span class="fa fa-arrow-circle-right">&nbsp;恢复</span>
                                    </button>
                                    <button data-check-permission="schedule:task:run" class="btn btn-outline btn-default" type="button" @click="run">
                                        <span class="fa fa-play">&nbsp;立即执行</span>
                                    </button>
                                </div>
                                <!--bootstrapTable-->
                                <table id="tbSchedule"></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--定时任务编辑-->
    <div class="ibox-content"  id="scheduleCreateOrUpdate" v-show="isShowForm">
        <form id="scheduleForm" class="form-horizontal">
            <!--隐藏域-->
            <input type="hidden" id="id" name="id">
            <div class="form-group">
                <label class="col-sm-2 control-label">任务名称：</label>
                <div class="col-sm-10">
                    <input type="text" maxlength="10" class="form-control" name="jobName" id="jobName" placeholder="请输入任务名称">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">bean名称：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="beanName" id="beanName" placeholder="请输入定时任务的spring bean名称，如：testTask"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">方法名称：</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="methodName" id="methodName" placeholder="请输入定时任务要执行的方法名称"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">执行参数：</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="params" placeholder="请输入执行定时任务时所需要的参数，如果有多个参数，请使用json格式组装"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">cron表达式：</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="cronExpression" id="cronExpression"   placeholder="请输入定时任务执行的cron表达式"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">任务描述：</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="remark" placeholder="请输入定时任务的备注信息"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">任务负责人：</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="author" placeholder="请输入定时任务的负责人"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">报警邮箱：</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="alarmEmail" placeholder="请输入报警邮箱，多个邮箱地址用逗号分隔开"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12" style="text-align: center;">
                    <button class="btn btn-primary" type="button" @click="save">保存</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
<!-- 全局js -->
<script type="text/javascript" src="js/common/public.js"></script>
<!-- Bootstrap table -->
<script src="plugin/bootstrap-table-master/bootstrap-table.min.js"></script>
<script src="plugin/bootstrap-table-master/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="js/modules/schedule/schedule.js"></script>
</html>